<%@ page language="java" import="java.util.*,java.sql.*"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<jsp:include page="console_element/top.jsp" />
<script language="javascript">
	function clickdel() {
		return confirm("删除请点击确认");
	}
</script>


<div id="main">
	<jsp:include page="console_element/left.html" />
	<div id="opt_area">
		<div class="content">
			<ul class="class_date">
				<!--遍历 显示topic list -->
				<li id='class_month'><a href="index.jsp?tid=1"><b></b> </a> <!--遍历 显示topic list -->
			</ul>

			<ul class="classlist">
				
				<ul class="classlist">
				<!-- 遍历显示 news list  -->
				<c:forEach var="news" items="${newsList}">
					<li><a href="${pageContext.request.contextPath}/NewsServlet?action=detail&nid=${news.nid}">${news.ntitle}</a> <span>作者:${news.nauthor}&#160;&#160;&#160;&#160;
					 <a href="${pageContext.request.contextPath}/AdminServlet?action=updateIndex&nid=${news.nid}">修改
					</a> &#160;&#160;&#160;&#160; 
					<a href="${pageContext.request.contextPath}/AdminServlet?action=deleteall&nid=${news.nid}"
					>删除</a></span></li>
				</c:forEach>				
				<!-- 遍历显示 news list  -->

				<!-- 分页显示 -->
				<p align="right">
					【当前第${page.pageNum}页，总${page.pages}共页】&nbsp;&nbsp; 
					<a href="${pageContext.request.contextPath}/AdminServlet?action=adminIndex&pageNum=1">首页</a>
					<a href="${pageContext.request.contextPath}/AdminServlet?action=adminIndex&pageNum=${page.prePage}">上页</a>
					<a href="${pageContext.request.contextPath}/AdminServlet?action=adminIndex&pageNum=${page.nextPage}">下页</a>
					<a href="${pageContext.request.contextPath}/AdminServlet?action=adminIndex&pageNum=${page.pages}">尾页</a>
				</p>

			</ul>
		</div>
	</div>
</div>

<jsp:include page="console_element/bottom.html" />
